package cn.com.surker.pages.console;

import cn.com.surker.common.AbstractController;
import cn.com.surker.enums.ICodeDescEnum;
import cn.com.surker.enums.production.indent.RoadTypeEnum;
import cn.com.surker.enums.sale.ContractCategoryEnum;
import cn.com.surker.system.entity.SysMenuRoleController;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;
import java.util.Map;

/**
 * 用于检查的页面,(ins的全称是inspect)
 *
 * @author luotao
 * @date 2025/3/31
 */
@Slf4j
@Controller
@RequestMapping("/console/ins")
public class InspectController extends AbstractController {

	/**
	 * 用于生产检查的消耗发货单消耗页面(仅查看消耗)
	 *
	 * @return
	 */
	@RequestMapping(value = "/invoice/lab")
	public ModelAndView invoiceLab() {
		ModelAndView mv = new ModelAndView();
		//	基础数据
		List<Map<String, Object>> categoryList = ICodeDescEnum.getEnumDatas(ContractCategoryEnum.class);
		List<Map<String, Object>> roadTypeList = ICodeDescEnum.getEnumDatas(RoadTypeEnum.class);
		mv.addObject("categoryList", categoryList);
		mv.addObject("roadTypeList", roadTypeList);
		mv.setViewName("console/ins/invoice-lab");
		return mv;
	}

	/**
	 * 用于生产检查的消耗发货单消耗页面(仿真操作)
	 *
	 * @return
	 */
	@RequestMapping(value = "/invoice/fz")
	public ModelAndView invoiceb() {
		ModelAndView mv = new ModelAndView();
		SysMenuRoleController menuRole = isControlVerify("/console/production/invoice");
		//	基础数据
		List<Map<String, Object>> categoryList = ICodeDescEnum.getEnumDatas(ContractCategoryEnum.class);
		List<Map<String, Object>> roadTypeList = ICodeDescEnum.getEnumDatas(RoadTypeEnum.class);
		mv.addObject("categoryList", categoryList);
		mv.addObject("roadTypeList", roadTypeList);
		mv.addObject("menuRole", menuRole);
		mv.setViewName("console/ins/invoice-fz");
		return mv;
	}


}
